﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Tool;

namespace AutoMachine
{
    public partial class Frm_Chart : Form
    {
        Tool.AutoResize FormResize = new AutoResize();
        public Frm_Chart()
        {
            InitializeComponent();
        }

        #region 窗体实例化
        /// <summary>
        /// 窗体实例化
        /// </summary>
        private static Frm_Chart _instance;
        public static Frm_Chart Instance
        {
            get
            {
                if (_instance == null || _instance.IsDisposed)
                    _instance = new Frm_Chart();
                return _instance;
            }
        }
        #endregion

        private void Frm_Chart_Load(object sender, EventArgs e)
        {
            FormResize.SetAutoResize(this);//窗体缩放实例化
        }

        private void RoundButton_Product_Click(object sender, EventArgs e)
        {
            if (Tool.FormsControl.CloseForm("Frm_Product", this.panelMain) == false)
            {
                Tool.FormsControl.OpenForm(new Frm_Product(), this.panelMain);
            }
        }
    }
}
